package com.woniu.smallmedical.server.serverimpl;

import com.woniu.smallmedical.entity.TreeMenu;
import com.woniu.smallmedical.entity.User;
import com.woniu.smallmedical.mapper.TreeMenuMapper;
import com.woniu.smallmedical.server.TreeMenuServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author author
 * @create 2021-09-26-8:59
 */
@Service
public class TreeMenuServerImpl implements TreeMenuServer {
    @Resource
    TreeMenuMapper treeMenuMapper;
    @Override
    public List<TreeMenu> getTreeMenu() {
        List<TreeMenu> treeMenus = treeMenuMapper.selectTreeMenu();
        return treeMenus;
    }

    @Override
    public User getTreeMenuBySid(Integer sid) {
        User treeMenus = treeMenuMapper.selectTreeMenuBySid(sid);
        System.out.println(treeMenus);
        return treeMenus;
    }
}
